package com.example.demo.service.dto.mapper;

import com.example.demo.dao.entity.User;
import com.example.demo.service.dto.UserDTO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

@Mapper
public interface UserMapper {
    UserMapper INSTANCE = Mappers.getMapper(UserMapper.class);

    @Mapping(source = "id", target = "userId")
    UserDTO entityUserToUserDTO(User user);
}
